home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97b.txt / 000062_icon-group-sender _Tue Sep 16 07:59:46 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by cheltenham.cs.arizona.edu (8.8.7/8.8.7) with SMTP id HAA07300
  4.     for <icon-group-addresses@cheltenham.CS.Arizona.EDU>; Tue, 16 Sep 1997 07:59:46 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA02851; Tue, 16 Sep 1997 07:59:45 -0700
  7. To: icon-group@cs.arizona.edu
  8. Date: Tue, 16 Sep 1997 13:41:08 +1000
  9. From: Stuart.Robinson@anu.edu.au (Stuart Robinson)
  10. Message-Id: <Stuart.Robinson-1609971341100001@asianstmg-221.anu.edu.au>
  11. Organization: ANU
  12. Sender: icon-group-request@cs.arizona.edu
  13. Subject: case selection expression
  14. Errors-To: icon-group-errors@cs.arizona.edu
  15. Status: RO
  16.  
  17.  
  18. How can I use the case selection expression to 1) check each line of a
  19. text for the presence or absence of a few key words and 2) do something
  20. according to which key word is present?  The logic is basically:
  21.  
  22. do 1    if find    "x"
  23. do    2    if find    "y"
  24. do    3    if find    "z"
  25. do 4 otherwise (as a default)
  26.  
  27. I think that the case selection expression (i.e., case X of {}) would
  28. work, but I don't really understand it and I don't have my manual handy. 
  29. I know that this can be done with if-then (else), but what I want to know
  30. is how "case of {}" works.
  31.  
  32. Thanks in advance for the help.
  33.  
  34. Cheers,
  35. Stuart Robinson
  36.  
  37. -- 
  38. Stuart Robinson <Stuart.Robinson@no_spam!anu.edu.au>
  39. The Australian National University
  40. *TO REPLY, REMOVE "no_spam!" FROM E-MAIL ADDRESS GIVEN ABOVE
  41.